package com.student.mapper;

import com.student.pojo.VenueReser;
import com.student.pojo.Venues;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface VenuesMapper {
    /**
     * 这边是显示所有的场地信息
     *
     * @param venues
     * @return
     */
    List<Venues> getAllVenues(@Param("venues") Venues venues);

    /**
     * 添加场地信息
     *
     * @param venues
     * @return
     */
    Integer addVenues(@Param("venues") Venues venues);

    /**
     * 修改场地信息
     *
     * @param venues
     * @return
     */
    Integer updateVenues(@Param("venues") Venues venues);

    /**
     * 删除场地信息
     *
     * @param id
     * @return
     */
    Integer deleteVenues(@Param("id") Integer id);

    List<Venues> getAllVenuesMessage();

    /**
     * 检查用户是否重复预约
     * @param id
     * @param venuesId
     * @param artistId
     * @return
     */
    VenueReser selectUser(@Param("id") Integer id,@Param("venuesId") Integer venuesId, @Param("artistId")Integer artistId);

    /**
     * 添加预约
     * @param idCard
     * @param id
     * @param phone
     * @param venuesId
     * @param artistId
     * @return
     */
    Integer addBooking(@Param("idCard") String idCard, @Param("id")Integer id, @Param("phone")String phone, @Param("venuesId")Integer venuesId,
                       @Param("artistId")Integer artistId,@Param("titleId") Integer titleId);

    List<VenueReser> getAllVenuesUserMessage(@Param("venueReser") VenueReser venueReser);
}
